<template>
  <div style="width: 100%;padding-top: 10px;">
    <!---->
    <el-form ref="userInfo" :model="userInfo" status-icon label-position="right"
             label-width="150px" style="display: flex">
      <div style="flex: 1;margin-left: 30px">
        <el-form-item label="登录用户名：">
          <span>{{ userInfo.userName }}</span>
        </el-form-item>
        <el-form-item label="手机号：">
          <span>{{ userInfo.mobile }}</span>
        </el-form-item>
        <el-form-item label="最后登录时间：">
          <span>{{ userInfo.timeLastLogin }}</span>
        </el-form-item>
        <el-form-item label="最后登录IP地址：">
          <span>{{ userInfo.lastLoginIP }}</span>
        </el-form-item>
        <el-form-item label="注册时间：">
          <span>{{ userInfo.timeAdd }}</span>
        </el-form-item>
        <el-form-item label="是否已实名认证：">
          <span>{{ userInfo.isChecked | isCheckedFilte }}</span>
        </el-form-item>
        <el-form-item label="姓名：">
          <span>{{ userInfo.realName }}</span>
        </el-form-item>
      </div>
      <div style="flex: 1">
        <el-form-item label="银行账号：">
          <span>{{ userInfo.account }}</span>
        </el-form-item>
        <el-form-item label="开户网点：">
          <span>{{ userInfo.interBankName }}</span>
        </el-form-item>
        <el-form-item label="佣金总额（元）：">
          <span>{{ userInfo.commTotal }}</span>
        </el-form-item>
        <el-form-item label="可提现佣金：">
          <span>{{ userInfo.commission }} 元</span>
        </el-form-item>
        <el-form-item label="一级推广人数：">
          <span>{{ userInfo.expend1 }}</span>
        </el-form-item>
        <el-form-item label="二级推广人数：">
          <span>{{ userInfo.expend2 }}</span>
        </el-form-item>
        <!--<el-form-item label="三级推广人数：">-->
          <!--<span>{{ userInfo.expend3 }}</span>-->
        <!--</el-form-item>-->
      </div>
    </el-form>
  </div>
</template>

<script>
import {doGet, doPost} from '@/api'
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination

export default {
  name: 'accountinform',
  filters: {
    isCheckedFilte(val) {
      return { '0': '否', '1': '是' }[val]
    }
  },
  components: {
    Pagination
  },
  data() {
    return {
      list: [],
      total: 0,
      userInfo: {
        userName: undefined,
        mobile: undefined,
        timeLastLogin: undefined,
        lastLoginIP: undefined,
        timeAdd: undefined,
        isChecked: undefined,
        realName: undefined,
        account: undefined,
        bankCode: undefined,
        commTotal: undefined,
        commission: undefined,
        expend1: undefined,
        expend2: undefined,
        expend3: undefined,
        extendCode: undefined,
        serverName: undefined,
        interBankNo: undefined,
        interBankName: undefined
      },
    }
  },
  created() {
    this.getList1()
  },
  methods: {
    //获取个人基本信息
    getList1() {
      doPost('personal.html?op=info', {}).then(response => {
        this.userInfo = response.data
        /*this.userInfo.serverName = window.location.href.replace('admin/index.html#/profile/password', '')*/
      }).catch(error => {
        this.$notify.error({
          title: '失败',
          message: error.message
        })
      })
    },
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
</style>
